$(document).ready(function(){
  var x=0
  var y=0
  var a=0
  var b=0
  var scroll_top=0
  var scroll_left=0
  var widths=0
  var heights=0
  
  //隐藏弹出层
  $(".ts_close_btn").click(function(){
	 $(".ts,.ts_zz").hide();
  })
  $(".click_me").click(
	 function(mouse_xy){
		 
	    //获取滚动的X值Y值
	   	scroll_top=$(document).scrollTop();
		//获得浏览器宽度
		widths=$("body").width();
		heights=$(document).height();
		a=Math.round(widths/2);
		b=screen.availHeight;
        c=Math.round(b/2);
		
		//获取Mouse X Y的坐标值并将值传递给新的弹出层
		x=a-120+"px";
		y=(c+scroll_top+"px");
		
		//显示弹出层并设置其它坐标值
	    $(".ts,.ts_zz").show();
		$(".ts").css("left",x).css("top",y).css("position","absolute");
		$(".ts_zz").css("position","absolute").css("left",0).css("top",0).css("height",heights);
	 })
})